package com.pattern.strategy;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RequiredArgsConstructor
public class StrategyContext {

    private final Map<String, Strategy> map;


    public boolean submit(String type){
        return map.get(type).submit();
    }

}
